<?php
declare (strict_types = 1);
namespace app\course\model\payment;

use app\common\model\payment\PaymentOrder as PaymentOrderCommon;
use app\promotion\model\Promotion;
use think\model\relation\HasOneThrough;

/**
 * 订单模型
 */
class PaymentOrder extends PaymentOrderCommon
{

	public function promotion(): HasOneThrough
	{
		return $this->hasOneThrough(Promotion::class, PaymentOrderItem::class, 'order_no', 'id', 'order_no', 'promotion_id')->append(['type_text']);
	}

}
 